package com.wds.controller;

import com.wds.domain.JsonResult;
import com.wds.service.OssUploadService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author WDs , wds8.24@outlook.com
 * @version 1.0
 * @since 2022-11-09 23:39
 */
@RestController
@Api(tags = "文件接口")
public class FileController {
    @Autowired
    private OssUploadService ossUploadService;

    @PostMapping("/upload")
    public JsonResult<String> uploadImg(MultipartFile img){
        //file service upload file

        return ossUploadService.uploadImg(img);
    }
}
